﻿/**
 * Create in 2012-4-5.
 */
package kit4j.common.event;

import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author MiniKnife
 *
 */
public abstract class AbstractEventFirer<L, E> implements EventFirer<L, E> {
	
	protected List<L> listenerList;
	
	public AbstractEventFirer() {
		listenerList = new ArrayList<L>();
	}

	/**
	 * @see kit4j.common.event.EventFirer#addListener(java.lang.Object)
	 */
	@Override
	public void addListener(L listener) {
		listenerList.add(listener);
	}

	/**
	 * @see kit4j.common.event.EventFirer#removeListener(java.lang.Object)
	 */
	@Override
	public void removeListener(L listener) {
		listenerList.remove(listener);
	}

}
